<?php
/**
 * Created by PhpStorm.
 * User: Reborn
 * Date: 2019/12/5
 * Time: 10:38
 */

declare(strict_types=1);

use think\facade\Route;

Route::group('/login', function () {
    Route::post('/login', 'auth/login');
    Route::post('/logout', 'auth/logout')->middleware(\thans\jwt\middleware\JWTAuth::class);
    Route::get('/refresh_token', 'auth/refreshToken')->middleware(\thans\jwt\middleware\JWTAuth::class);
})->allowCrossDomain();


Route::group('/v1',function (){
    Route::resource('idnex','Index');
    Route::resource('admin','Admin');
    Route::resource('role','Role');
})->allowCrossDomain();
